#ifndef ObjectView_First
#ifdef __GNUG__
#pragma interface
#endif
#define ObjectView_First

#include "CollView.h"

class PeShowMembers;
class Ref;
class PeInspectorItem0;

//---- ObjectView --------------------------------------------------------------

class PeObjectView: public CollectionView {
public:
	MetaDef(PeObjectView);

	PeObjectView();
	~PeObjectView();

	void DoSelect(Rectangle r, int clicks);
	Command *DoLeftButtonDownCommand(Point, Token, int);
	void UpdateViews();
	void SetInspected(Ref *newinsp);
	Ref *GetInspected()
		{ return inspected; }

	void Build();
	void BuildInstanceView();
	void BuildArrayView();
	void AddItem(PeInspectorItem0 *ii);

	void DoSetupMenu(Menu *menu);
	Command *DoMenuCommand(int);
	Command *DispatchEvents(Point lp, Token &t, Clipper *cl);

	void InspectedDied();
	void DoObserve(int, int, void*, Object*);
	bool PrintOnWhenObserving(Object *);

private:
	static PeShowMembers *accessor;
	static int accessorcnt;

	Ref *inspected;
	bool shifted;
};

#endif

